<include file="../Public/agent.header.html" />
<link href="__PUBLIC__/Css/user.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="__PUBLIC__/Js/user/common.js" charset="UTF-8"></script>
		
<script>
var CURRENT_PURL = "";
$(document).ready(function(){
	getPURL();
});
function getPURL(){
	$.kajax({      
		url:"{:U('agent://Account/getpluginurl')}",      
		type:'post', //数据发送方式  
		data:{} ,    
		ajx_rtn_type:'JSON',
		async: false ,//同步方式     
		success: function(obj){ 
			//alert(obj.msg);
			if(obj.status==1){
				CURRENT_PURL = obj.data;
				resetinput_copyhtml();
			}else{
				$('#iframe_area').html(obj.msg);
				CURRENT_PURL = '';
			}
		}
	});
}

function resetinput_copyhtml(){
	var width_  = '750'; 
	var height_ = '750';
	var _tmp = "";
	if(CURRENT_PURL==''){
		_tmp = '请生成连接密钥';
	}else{
		_tmp = '<iframe width="'+width_+'" height="'+height_+'" frameborder="0" scrolling="no" src="'+CURRENT_PURL+'"></iframe>';
			
	}
	$('#iframe_area').html(_tmp);
}

</script>
<div id="mainWrapper">
<div id="main">

	<include file="../agent/Tpl/default/Public/user_left_nav_box.html" />
  
  	<div id="right_box">
	    <div id="top_nav" class="item_top">
			<ul>
				<li class="top_bar top-bar-wide top_baron">代客送礼</li>
			</ul>
		</div>
		<div class="blank10"></div>
<php>if($agentstatus['status']!=1){</php>
	  	<div class="k_desc_div" style="margin:0 0 15px 0px;">
				<div class="k_icon k_bulb"></div>
				<strong>提示</strong>
				<div>
					{$agentstatus['msg']}
				</div>
		</div>	
<php>}else{</php>
	<div class="blank10"></div>
	<div id="iframe_area" style="margin:0px auto; display: block; margin: 0 auto; text-align: center;"></div>
<php>}</php>


	</div>
		
</div>
</div>
<include file="../Public/footer.html" />